<template>
	<view class="pft-item" @click="toDetailPage">
		<view class="title">
			<text class="car-num">{{$utils.eliminate(itemInfo.carLicense)}}</text>
			<text class="label">{{$utils.eliminate(itemInfo.statusName)}}</text>
		</view>
		<view class="cust-detail">
			<view class="item">
				<text class="label">客户姓名</text>
				<text class="value">{{$utils.eliminate(itemInfo.contactorName)}}</text>
			</view>
			<view class="item">
				<text class="label">电话号码</text>
				<text class="value">{{$utils.eliminate(itemInfo.contactorTel)}}</text>
			</view>
			<view class="item">
				<text class="label">接车时间</text>
				<text class="value">{{$utils.eliminate(itemInfo.checkTime)}}</text>
			</view>
		</view>
		<view class="bottom">
			<text class="label">服务顾问：</text>
			<text class="name">{{$utils.eliminate(itemInfo.saEmpName)}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			itemInfo:{type:Object,default:()=>{}}
		},
		data() {
			return {
				
			}
		},
		methods: {
			toDetailPage() {
				// console.log(this.itemInfo.checkId)
				// return 
				const url = '/pages/views/carPreFlight/carPreDetails';
				this.$store.commit('formType',this.itemInfo.statusCode === '0' ? 'edit' : 'detail')
				const params ={
					checkId:this.itemInfo.checkId,
					type:this.itemInfo.statusCode === '0' ? 'edit' : 'detail'
				}
				this.$navTo.togo(url,params);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.pft-item{
		display: flex;
		flex-direction: column;
		width: 100%;
		margin-top: 30rpx;
		padding: 30rpx 20rpx 20rpx;
		border: 1rpx solid #f1f1f1;
		background: #fff;
		border-radius: 10rpx;
	}
	.label {
		font-size: 24rpx;
		color: #999;	
	}
	.title {
		display: flex;
		align-items: center;
		justify-content: space-between;
		
		.car-num {
			font-size: 32rpx;
			color: #333;
		}
	}
	.cust-detail {
		display: flex;
		flex-wrap: wrap;
		margin-top: 20rpx;
		padding-bottom: 20rpx;
		background: #F9FAFE;
		
		.item {
			display: flex;
			flex-direction: column;
			width: 50%;
			margin-top: 20rpx;
			padding-left: 20rpx;
			
			.value {
				margin-top: 16rpx;
				font-size: 24rpx;
				color: #333;
			}
		}
	}
	.bottom {
		display: flex;
		margin-top: 24rpx;
		font-size: 24rpx;
		
		.name {
			color: #4f75be;
		}
	}
</style>
